import { type App } from 'vue';

import { createPinia, defineStore } from 'pinia';

interface ScreenState {
  theme: 'dark' | 'light';
  title: string;
}

export const useScreenStore = defineStore({
  id: 'screen',
  state: (): ScreenState => {
    return {
      theme: 'dark',
      title: '滑坡预警检测云平台',
    };
  },
});

export const install = (app: App) => {
  app.use(createPinia());
};
